#import <UIKit/UIKit.h>

#import "framework/FWPlugin.h"
#import "framework/FWApplicationDelegate.h"
#import "framework/FWDBAccess.h"

#import "PIIntegration.h"

@class SBApplication;


@interface PIPlugin : FWPlugin <FWApplicationDelegate, FWDBAccessDelegate> {
    BOOL pocketInformantPresent;
    BOOL pocketInformantFull;
    
    NSDictionary* dbEntityKeys;
    PIDatabaseVersion dbVersion;
    NSDate* pocketInformantLastSeen;
}

@property (retain) NSString* appURLScheme;
@property (retain) NSString* appDisplayIdentifier;
@property (retain) NSString* appBundleIdentifier;
@property (readonly) NSDictionary* dbEntityKeys;
@property (readonly) PIDatabaseVersion dbVersion;
@property (readonly, getter=isPocketInformantPresent) BOOL pocketInformantPresent;
@property (readonly, getter=isPocketInformantFull) BOOL pocketInformantFull;
@property (retain) NSDate* pocketInformantLastSeen;


+ (SBApplication*)findPocketInformantForApplication:(FWApplication*)appl;

- (id)initWithApplication:(FWApplication*)app name:(NSString *)name;
- (id)initAsPIPresent;
- (id)initWithPIVersion:(NSInteger)vers;

// Object management
- (void)dealloc;

@end
